<?php

// +----------------------------------------------------------------------
// | 模型基类
// +----------------------------------------------------------------------
// | @author fancsen
// +----------------------------------------------------------------------

namespace app\api\model;

use think\Model;

class BaseModel extends Model
{
    /**
    * 拼接图片完整路径
    * @param string $value  
    * @param array $data  
    * @return string 返回完整路径
    */
    protected function prefixImgUrl($value,$data)
    {
        $finalUrl = $value;
        if($data['from'] == 1){
            $finalUrl = config('api.img_prefix').$value;
        }
        return $finalUrl;
    }
}